import React, { PureComponent } from 'react';
import { Link } from 'umi';
import { connect } from 'dva';
import './index.less';

// @ts-ignore
@connect(({ global }) => ({ global }))
export default class UserCenterFloat extends PureComponent {
  render(): any {
    // @ts-ignore
    const flag = this.props.global.flag;
    if (flag === 'userCentral') {
      return (
        <div>
          <span className={'float-center'}>
            <Link to={'/user_central'}>个人中心</Link>
          </span>
        </div>
      );
    }
    if (flag === 'home' || flag === undefined || flag === '') {
      return (
        <div>
          <span className={'float-center'}>
            <Link to={'/home'}>首页</Link>
          </span>
        </div>
      );
    }
  }
}
